##############################
# Table A6 and A7
##############################

rm(list=ls())

#sink("~/Dropbox/COVID Peru/08_replication/09_regressions.txt")

library(foreign)
library(Hmisc)
library(ri)
library(stargazer)

##############################
# Prepare data
##############################

# load data
d = read.dta("clean_survey_experiment_covid_peru.dta")

# explore data
names(d)
head(d)
table(d$acuerdo_cuarentena, exclude = NULL)
mean(d$acuerdo_cuarentena_binary)

############################
# Main effects
############################

# economy treatment 
summary(lm(d$acuerdo_cuarentena_binary ~ d$t_ind_economia))
summary(lm(d$acuerdo_cuarentena ~ d$t_ind_economia))

# health treatment 
summary(lm(d$acuerdo_cuarentena_binary ~ d$t_ind_salud))
summary(lm(d$acuerdo_cuarentena ~ d$t_ind_salud))

sink()

